/**
 * MarioCoinPickupFactory - patterned after UTHealthPickupFactory
 * @extends UTItemPickupFactory
 * @version 2010.11.30
 */

class MarioCoinPickupFactory extends UTItemPickupFactory
	abstract;

/**
 * UpdateHUD
 * @version 2010.11.30
 */
simulated static function UpdateHUD(UTHUD H)
{
	Super.UpdateHUD(H);
}

/**
 * SpawnCopyFor
 * @version 2010.11.30
 */
function SpawnCopyFor(Pawn Recipient)
{
	MarioPawn(Recipient).coins++;

	if (UTPlayerReplicationInfo(Recipient.PlayerReplicationInfo) != None)
		UTPlayerReplicationInfo(Recipient.PlayerReplicationInfo).IncrementPickupStat(GetPickupStatName());

	super.SpawnCopyFor(Recipient);
}

//=============================================================================
// Pickup state: this inventory item is sitting on the ground.

auto state Pickup
{
	/**
	 * ValidTouch
	 * @version 2010.11.30
	 */
	function bool ValidTouch(Pawn Other)
	{
		if (!Super.ValidTouch(Other))
			return false;

		return true;
	}
}

defaultproperties
{
	bMovable = FALSE
	bStatic  = FALSE

    PickupStatName      = PICKUPS_HEALTH
	MaxDesireability    = 0.700000

	BaseBrightEmissive  = (R = 2.00, G = 50.0, B = 10.0, A = 1.0)
	BaseDimEmissive     = (R = 0.20, G = 5.00, B = 1.00, A = 0.0)

	RespawnSound        = SoundCue'A_Pickups.Health.Cue.A_Pickups_Health_Respawn_Cue'

	Begin Object Class=StaticMeshComponent Name=HealthPickUpMesh
	    CastShadow              = FALSE
		bCastDynamicShadow      = FALSE
		bAcceptsLights          = TRUE
		bForceDirectLightMap    = TRUE
		LightEnvironment        = PickupLightEnvironment

		AlwaysLoadOnClient      = TRUE
		AlwaysLoadOnServer      = TRUE

		CollideActors           = FALSE
		BlockActors             = FALSE
		BlockRigidBody          = FALSE

		MaxDrawDistance         = 4500
	End Object

	PickupMesh = HealthPickUpMesh
	Components.Add(HealthPickUpMesh)
}
